package com.kb.design.controller;

import com.kb.design.common.ApiResponse;
import com.kb.design.entity.DesignEncapsulation;
import com.kb.design.service.DesignEncapsulationServer;
import javax.annotation.Resource;;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Auther:chenzx
 * @Date:2023/11/13
 * @Description:需求数据
 */
@RestController
@RequestMapping("encapsulation")
public class DesignEncapsulationController {

    @Resource
    private DesignEncapsulationServer designEncapsulationServer;

    /**
     * 封装提交
     *
     * @param
     * @return
     */
    @PostMapping("submit")
    public ApiResponse submit(@RequestBody DesignEncapsulation designEncapsulation) {
        designEncapsulationServer.submit(designEncapsulation);
        return ApiResponse.success("提交成功");
    }

    /**
     * 封装交流
     *
     * @param
     * @return 查询结果
     */
    @PostMapping("communicateSubmit")
    public ApiResponse communicateSubmit(@RequestBody DesignEncapsulation designEncapsulation) {
//        designEncapsulationServer.submit(designEncapsulation);
        return ApiResponse.success("提交成功");
    }

}
